Integrand size = 31, antiderivative size = 64 \[ \int (a+i a \tan (e+f x))^m (c-i c \tan (e+f x))^2 \, dx=-\frac {2 i c^2 (a+i a \tan (e+f x))^m}{f m}+\frac {i c^2 (a+i a \tan (e+f x))^{1+m}}{a f (1+m)} \]
[Out]
Time = 0.17 (sec) , antiderivative size = 64, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.097, Rules used = {3603, 3568, 45} \[ \int (a+i a \tan (e+f x))^m (c-i c \tan (e+f x))^2 \, dx=\frac {i c^2 (a+i a \tan (e+f x))^{m+1}}{a f (m+1)}-\frac {2 i c^2 (a+i a \tan (e+f x))^m}{f m} \]
[In]
[Out]
Rule 45
Rule 3568
Rule 3603
Rubi steps \begin{align*} \text {integral}& = \left (a^2 c^2\right ) \int \sec ^4(e+f x) (a+i a \tan (e+f x))^{-2+m} \, dx \\ & = -\frac {\left (i c^2\right ) \text {Subst}\left (\int (a-x) (a+x)^{-1+m} \, dx,x,i a \tan (e+f x)\right )}{a f} \\ & = -\frac {\left (i c^2\right ) \text {Subst}\left (\int \left (2 a (a+x)^{-1+m}-(a+x)^m\right ) \, dx,x,i a \tan (e+f x)\right )}{a f} \\ & = -\frac {2 i c^2 (a+i a \tan (e+f x))^m}{f m}+\frac {i c^2 (a+i a \tan (e+f x))^{1+m}}{a f (1+m)} \\ \end{align*}
Time = 1.27 (sec) , antiderivative size = 47, normalized size of antiderivative = 0.73 \[ \int (a+i a \tan (e+f x))^m (c-i c \tan (e+f x))^2 \, dx=-\frac {c^2 (a+i a \tan (e+f x))^m (i (2+m)+m \tan (e+f x))}{f m (1+m)} \]
[In]
[Out]
Time = 2.58 (sec) , antiderivative size = 78, normalized size of antiderivative = 1.22
method | result | size |
derivativedivides | \(-\frac {c^{2} \tan \left (f x +e \right ) {\mathrm e}^{m \ln \left (a +i a \tan \left (f x +e \right )\right )}}{f \left (1+m \right )}-\frac {i \left (c^{2} m +2 c^{2}\right ) {\mathrm e}^{m \ln \left (a +i a \tan \left (f x +e \right )\right )}}{f m \left (1+m \right )}\) | \(78\) |
default | \(-\frac {c^{2} \tan \left (f x +e \right ) {\mathrm e}^{m \ln \left (a +i a \tan \left (f x +e \right )\right )}}{f \left (1+m \right )}-\frac {i \left (c^{2} m +2 c^{2}\right ) {\mathrm e}^{m \ln \left (a +i a \tan \left (f x +e \right )\right )}}{f m \left (1+m \right )}\) | \(78\) |
norman | \(-\frac {c^{2} \tan \left (f x +e \right ) {\mathrm e}^{m \ln \left (a +i a \tan \left (f x +e \right )\right )}}{f \left (1+m \right )}-\frac {i \left (c^{2} m +2 c^{2}\right ) {\mathrm e}^{m \ln \left (a +i a \tan \left (f x +e \right )\right )}}{f m \left (1+m \right )}\) | \(78\) |
risch | \(\text {Expression too large to display}\) | \(1447\) |
[In]
[Out]
none
Time = 0.24 (sec) , antiderivative size = 85, normalized size of antiderivative = 1.33 \[ \int (a+i a \tan (e+f x))^m (c-i c \tan (e+f x))^2 \, dx=-\frac {2 \, {\left (i \, c^{2} m + i \, c^{2} e^{\left (2 i \, f x + 2 i \, e\right )} + i \, c^{2}\right )} \left (\frac {2 \, a e^{\left (2 i \, f x + 2 i \, e\right )}}{e^{\left (2 i \, f x + 2 i \, e\right )} + 1}\right )^{m}}{f m^{2} + f m + {\left (f m^{2} + f m\right )} e^{\left (2 i \, f x + 2 i \, e\right )}} \]
[In]
[Out]
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 313 vs. \(2 (49) = 98\).
Time = 0.47 (sec) , antiderivative size = 313, normalized size of antiderivative = 4.89 \[ \int (a+i a \tan (e+f x))^m (c-i c \tan (e+f x))^2 \, dx=\begin {cases} x \left (i a \tan {\left (e \right )} + a\right )^{m} \left (- i c \tan {\left (e \right )} + c\right )^{2} & \text {for}\: f = 0 \\- \frac {2 c^{2} f x \tan {\left (e + f x \right )}}{2 a f \tan {\left (e + f x \right )} - 2 i a f} + \frac {2 i c^{2} f x}{2 a f \tan {\left (e + f x \right )} - 2 i a f} + \frac {i c^{2} \log {\left (\tan ^{2}{\left (e + f x \right )} + 1 \right )} \tan {\left (e + f x \right )}}{2 a f \tan {\left (e + f x \right )} - 2 i a f} + \frac {c^{2} \log {\left (\tan ^{2}{\left (e + f x \right )} + 1 \right )}}{2 a f \tan {\left (e + f x \right )} - 2 i a f} + \frac {4 c^{2}}{2 a f \tan {\left (e + f x \right )} - 2 i a f} & \text {for}\: m = -1 \\2 c^{2} x - \frac {i c^{2} \log {\left (\tan ^{2}{\left (e + f x \right )} + 1 \right )}}{f} - \frac {c^{2} \tan {\left (e + f x \right )}}{f} & \text {for}\: m = 0 \\- \frac {c^{2} m \left (i a \tan {\left (e + f x \right )} + a\right )^{m} \tan {\left (e + f x \right )}}{f m^{2} + f m} - \frac {i c^{2} m \left (i a \tan {\left (e + f x \right )} + a\right )^{m}}{f m^{2} + f m} - \frac {2 i c^{2} \left (i a \tan {\left (e + f x \right )} + a\right )^{m}}{f m^{2} + f m} & \text {otherwise} \end {cases} \]
[In]
[Out]
\[ \int (a+i a \tan (e+f x))^m (c-i c \tan (e+f x))^2 \, dx=\int { {\left (-i \, c \tan \left (f x + e\right ) + c\right )}^{2} {\left (i \, a \tan \left (f x + e\right ) + a\right )}^{m} \,d x } \]
[In]
[Out]
\[ \int (a+i a \tan (e+f x))^m (c-i c \tan (e+f x))^2 \, dx=\int { {\left (-i \, c \tan \left (f x + e\right ) + c\right )}^{2} {\left (i \, a \tan \left (f x + e\right ) + a\right )}^{m} \,d x } \]
[In]
[Out]
Time = 0.60 (sec) , antiderivative size = 112, normalized size of antiderivative = 1.75 \[ \int (a+i a \tan (e+f x))^m (c-i c \tan (e+f x))^2 \, dx=-\frac {c^2\,{\left (\frac {a\,\left (\cos \left (2\,e+2\,f\,x\right )+1+\sin \left (2\,e+2\,f\,x\right )\,1{}\mathrm {i}\right )}{\cos \left (2\,e+2\,f\,x\right )+1}\right )}^m\,\left (m\,1{}\mathrm {i}+\cos \left (2\,e+2\,f\,x\right )\,2{}\mathrm {i}+m\,\cos \left (2\,e+2\,f\,x\right )\,1{}\mathrm {i}+m\,\sin \left (2\,e+2\,f\,x\right )+2{}\mathrm {i}\right )}{f\,m\,\left (\cos \left (2\,e+2\,f\,x\right )+1\right )\,\left (m+1\right )} \]
[In]
[Out]